<template>
    <div>
        <!-- 头部 -->
        <ul class="menu_top_list book_view_top">
            <router-link tag="li" to="/home"><span>返回</span></router-link>
            <li>历史记录</li>
            <li></li>
        </ul>
        <!-- 内容 -->
        <div class="book-top">
            <ul class="book_bk_qs1 book_list" v-for="(image, index) in qc" :key="'ifo-' + index">
                <router-link tag="a" :to="'./BookContent?id=' + image.id">
                    <li><img :src="image.imc">
                        <div>战斗 / 运动 / 倒追 / 女性主角 /</div>
                    </li>

                    <li>

                        <div id="listtitle">{{ image.name }}</div>


                        <div class="zuozhe">{{ image.author }}/玄幻</div>
                    </li>
                </router-link>
            </ul>
        </div>

    </div>
</template>
  
<script>
// import "../assets/font/iconfont";
// import Swiper from "swiper";
import { getJsonData } from '@/api/home';

export default {
    data() {
        return {


            newVip: null,
            vipEnd: null,
            bookId: null,
            bookLook: null

        };
    },
    created() {
        // 获取数据
        this.bookLook = this.$store.state.bookLookLists
        // 数组数据倒转
        // this.bookLook.reverse()

 

        // 去重
        const map = new Map()
        this.qc = this.bookLook.filter(key => !map.has(key.id) && map.set(key.id, 1)) // 这里对name属性进行去重

        //   console.log(qc)

        console.log("qc=>", this.qc)






    },

 
}

</script>
<style lang="scss">
.book-top {
    margin-top: 50px;
}
</style>